#include <fasys/config_spaces.hpp>
#include <iostream>

using namespace fasys;

int main()
{
  config_spaces cs;
  cs.add( channel_space("mamba.test.message") );
  cs.add( channel_space("mamba.test") );
  cs.add( channel_space("mamba.test.photo.") );
  

  channel_space c = cs.find("mamba.mychannel");
  std::cout << "1 mamba.mychannel: " << c.channel << std::endl;
  c = cs.find("mamba.test.mychannel");
  std::cout << "2 mamba.test.mychannel: " << c.channel << std::endl;
  c = cs.find("mamba.test.achannel");
  std::cout << "3 mamba.test.achannel: " << c.channel << std::endl;
  c = cs.find("mamba.test.zchannel");
  std::cout << "4 mamba.test.zchannel: " << c.channel << std::endl;
  c = cs.find("mamba.test");
  std::cout << "5 mamba.test: " << c.channel << std::endl;
  c = cs.find("mamba.tst");
  std::cout << "6 mamba.tst: " << c.channel << std::endl;

  c = cs.find("mamba.test.photo.my");
  std::cout << "7 mamba.test.photo.my: " << c.channel << std::endl;

    c = cs.find("mamba.test.photolab");
  std::cout << "7 mamba.test.photolab: " << c.channel << std::endl;

  return 0;
}
